package com.xpffly.design.visitor.demo.service.impl;

import com.xpffly.design.visitor.demo.service.Animal;
import com.xpffly.design.visitor.demo.service.Person;

/**
 * @Author: 午夜学徒
 * @Date: 2022/4/5 16:56
 * @Description：具体元素角色---猫
 */
public class Cat implements Animal {
    /**
     * 接受访问者访问
     *
     * @param person
     */
    public void accept(Person person) {
        person.feed(this);
    }

    /**
     * 业务处理
     */
    public void doSomething() {
        System.out.println("喵喵喵...");
    }
}
